From: Cosimo Cecchi Date: Mon, 10 Oct 2016 23:59:31 +0000 (-0700) Subject: osdWindow: always round-up sizes when updating allocation X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~689 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f819654ec8f95e4aa38810e8513f4ee004be7b02;p=gnome-shell.git osdWindow: always round-up sizes when updating allocation This fixes the OSD window flickering horizontally at certain resolutions. https://bugzilla.gnome.org/show_bug.cgi?id=772287 --- diff --git a/js/ui/osdWindow.js b/js/ui/osdWindow.js index 432ea9af7..4c2b00b22 100644 --- a/js/ui/osdWindow.js +++ b/js/ui/osdWindow.js @@ -72,8 +72,8 @@ const OsdWindowConstraint = new Lang.Class({ // Recenter let [x, y] = actorBox.get_origin(); - actorBox.set_origin(Math.floor(x + width / 2 - size / 2), - Math.floor(y + height / 2 - size / 2)); + actorBox.set_origin(Math.ceil(x + width / 2 - size / 2), + Math.ceil(y + height / 2 - size / 2)); } });